using UnityEngine;

public class Enemy : MonoBehaviour {
    //测试人物死亡
    private void Update() {
        if(Input.GetKeyDown(KeyCode.Space)){
            Die();
        }
    }
    private void Die(){
        GetComponent<LootBag>().InstantiateLoot(transform.position);
        Destroy(gameObject);
    }
}